﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using DotLiquid;

namespace FastCodeGeneration.Core.Utility
{
    public class CodeGenerationUtility
    {
        public static string GetCodeByTemplate(string templateString, object obj)
        {
            Template template = Template.Parse(templateString);  // 解析和编译模板
            var code = template.Render(Hash.FromAnonymousObject(obj));
            return code;
        }




    }
}
